<link rel="stylesheet" href="/layui/css/layui.css">
<script type="text/javascript" src="/layui/layui.js"></script>
<script type="text/javascript" src="/layui/js/jquery.min.js"></script>
<body>
<form class="layui-form"  action="/admin/customer/customer_Redistribution" method="post">
    <div class="layui-form-item"  >
        <div class="layui-input-block" id="sb" >

        </div>
    </div>
   <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">分配用户</label>
            <div class="layui-input-inline">
                <select name="user_id">
                    <option value="">请选择问题</option>
                    <optgroup label="员工">
                        @foreach($users as $user)
                            <option value="{{$user->id}}">{{$user->name}}</option>
                        @endforeach
                    </optgroup>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-input-block">
            <button type="button" class="layui-btn" onclick="show()" >获取选中行数据</button>
            <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>
</form>
<script>

    layui.use(['form'], function(){
//监听提交
        var form = layui.form;
        form.on('submit(demo1)', function(data){
            layer.alert(JSON.stringify(data.field), {
                title: '最终的提交信息'
            })
            return true;
        });
    });
    function show(){
        var form = layui.form;
        form.render();
    }

</script>
</body>